/*
package org.itboys.mobile.service.mongo.mobile;



import org.itboys.commons.ErrorException;
import org.itboys.commons.utils.tools.LongUtil;
import org.itboys.mobile.common.SundayCommonConstants;
import org.itboys.mobile.dto.TianJieFinanceAccountDto;
import org.itboys.mobile.entity.mongo.TianJieFinanceAccount;
import org.itboys.mobile.util.baidu.BaiDuBankUtil;
import org.itboys.mongodb.core.MongoDataSource;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


*/
/**
 * 包名：com.hz.sunday.tianjie.service.mongo
 * 作者 : 江雄
 * Email: empty90911@126.com
 * 时间：2016年3月17日 上午10:15:33 
 * 描述:天街_金融_提现账户_service
 *
 *//*

@Service
public class TianJieMobileAccountServiceOld extends BaseMongoService<TianJieFinanceAccount> {


	@Resource(name = "mobileDs")
	private MongoDataSource mobileDataSource;
	@Override
	protected MongoDataSource getMongoDataSource() {
		return mobileDataSource;
	}

	@Override
	protected Class<TianJieFinanceAccount> getEntityClass() {
		return TianJieFinanceAccount.class;
	}

	*/
/**
	 * 新增或修改提现账号
	 * @param accountId
	 * @param memberId
	 * @param bankName
	 * @param bankLogo
	 * @param accountName
	 * @param accountNo
	 *//*

	public void saveAccount(Long accountId,Long memberId,
							String bankName, String bankLogo, String accountName, String accountNo){
		if(LongUtil.isNotZreo(accountId)){
			TianJieFinanceAccount account = new TianJieFinanceAccount(memberId,  bankName,  bankLogo,  accountName,  accountNo);
			account.setId(accountId);
			super.updateExceptEmpty(accountId, account);
		}else{
			TianJieFinanceAccount account = new TianJieFinanceAccount(memberId,  bankName,  bankLogo,  accountName,  accountNo);
			super.save(account);
		}
		
	}

	*/
/**
	 * 获取提现账号。不分页
	 * @param memberId
	 * @return
	 *//*

	public List<TianJieFinanceAccountDto> getAccount(Long memberId){
		Map<String,Object> param =new HashMap<String,Object>();
		param.put("isDeleted", SundayCommonConstants.NO);
		param.put("memberId", memberId);
		return packageDtoMuilt(super.list(param));
	}
	//删除

	*/
/**
	 * 删除
	 * @param accountId
	 * @param memberId
	 *//*

	public void deleteAccount(Long accountId,Long memberId){
		//校验
		TianJieFinanceAccount account = super.getById(accountId);
		if(account.getMemberId().longValue()!=memberId.longValue()){
			throw new ErrorException("账户数据错误，请重试");
		}
		super.delete(accountId);
	}
	//通过银行卡号获取

	*/
/**
	 * 校验银行卡是否有效，新增或编辑银行卡前调用。校验成功后会返回对应的银行卡信息
	 * @param bankAccountNo
	 * @return
	 *//*

	public Map<String,Object> check(String bankAccountNo){
		Map<String,Object> result = BaiDuBankUtil.getBankInfo(bankAccountNo);
		Integer status=(Integer)result.get("status");
		if(status==1){
			result.put("bankAccountNo", bankAccountNo);
			return result;
		}else{
			throw new ErrorException((String)result.get("message"));
		}
		
	}


	*/
/**
	 * 组装DTO
	 * @param accounts
	 * @return
	 *//*

	public List<TianJieFinanceAccountDto> packageDtoMuilt(List<TianJieFinanceAccount> accounts){
	//	String imageRoot =resourceHolder.getStringValue("imgRoot");
		List<TianJieFinanceAccountDto> dtos = new ArrayList<>();
		for(TianJieFinanceAccount account:accounts){
			dtos.add(new TianJieFinanceAccountDto(account.getId(), account.getCreateTime(),account.getCreateDate(),
					account.getBankName(), account.getBankLogo(), account.getAccountName(), account.getAccountNo()));
		}
		return dtos;
	}
}
*/
